package com.person.yhzs;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.net.InetAddress;
import java.net.UnknownHostException;

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@MapperScan({"com.person.yhzs.**.mapper"})
@EnableTransactionManagement    //开启事务管理
public class YhzsApplication {

    public static void main(String[] args) {
        SpringApplication.run(YhzsApplication.class, args);
        String hostAddress = null;
        try {
            InetAddress addr = InetAddress.getLocalHost();
            hostAddress = addr.getHostAddress();
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
        System.out.println("swagger文档地址：http://" + hostAddress + ":6001/swagger-ui.html");
    }

}
